

function tableList() {
    $('tbody').html('');
    for (var i=0; i<cityArr.length; i++) {

        var ctn = cityArr[i].id;

        var filteredCityArr = schoolArr.filter(item => item.cityNo == ctn);

        //接洽中
        var jqz = 0;
        for (var j=0; j<filteredCityArr.length; j++) {
            if (filteredCityArr[j].State == "接洽中") {
                jqz++
            }
        }

        //待审
        var ds = 0;
        for (var j=0; j<filteredCityArr.length; j++) {
            if (filteredCityArr[j].State == "待审") {
                ds++
            }
        }

        //审核未通过
        var shwtg = 0;
        for (var j=0; j<filteredCityArr.length; j++) {
            if (filteredCityArr[j].State == "审核未通过") {
                shwtg++
            }
        }

        //推广开展
        var tgkz = 0;
        for (var j=0; j<filteredCityArr.length; j++) {
            if (filteredCityArr[j].State == "推广开展") {
                tgkz++
            }
        }


        $('tbody').append(`
        <tr>
            <td>${cityArr[i].name}</td>
            <td>${jqz+ds+shwtg+tgkz}</td>
            <td>${jqz}</td>
            <td>${ds}</td>
            <td>${shwtg}</td>
            <td>${tgkz}</td>
        </tr>
        `);
    }
}

tableList();